<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro"
      xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>修改房屋物品信息</title>
    <link th:replace="common/header"/>
</head>
<body class="no-skin">
<div th:replace="common/top"/>
<div class="main-container ace-save-state" id="main-container">
    <div th:replace="common/menu"/>
    <div class="main-content">
        <div class="main-content-inner">
            <div th:replace="common/title"/>
            <div class="page-content">
                <div th:replace="common/skin"/>
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <form class="form-horizontal" action="add.do" name="form" th:action="@{/stuffInfo/edit}"
                              th:method="post" th:object="${stuffInfo}">
                            <input type="hidden" id="id" name="id" th:value="*{id}">
                            <input type="hidden" id="rentingId" name="rentingId" th:value="*{rentingId}">
                            <h3 class="header smaller lighter blue"><i class="fa fa-plus" aria-hidden="true"></i>修改房屋物品信息
                            </h3>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="rentingId">租赁房屋所有人:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="rentingId" id="rentingId" class="input_fix"
                                                   placeholder="租赁房屋所有人"
                                                   th:value="*{rentingHouse.owner}" maxlength="50" readonly="readonly"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="name">物品名称:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="name" id="name" class="input_fix" placeholder="物品名称"
                                                   th:value="*{name}" maxlength="50"/>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('rentingId')}"
                                                                  th:errors="*{rentingId}">
                                        Name Error</span>&nbsp;</span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('name')}"
                                                                  th:errors="*{name}">Name
                                        Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="number">物品数量:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <input name="number" id="number" class="input_fix" placeholder="物品数量"
                                                   th:value="*{number}" maxlength="50"/>
                                        </div>
                                    </div>
                                </div>
                                <div class="span6">
                                    <div class="control-group">
                                        <label class="control-label" for="status">物品状态:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <select th:field="*{status}" id="status" name="status"
                                                    class="input_fix" th:value="*{status}">
                                                <option value="">--请选择--</option>
                                                <option th:each="status : ${T(xyz.ibenben.zhongdian.system.entity.enums.StuffStatusEnum).values()}"
                                                        th:value="${status}"
                                                        th:text="${status.text}"></option>
                                            </select>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('number')}"
                                                                  th:errors="*{number}">
                                        Name Error</span>&nbsp;</span>
                                </div>
                                <div class="span6">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('status')}"
                                                                  th:errors="*{status}">Name
                                        Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <!--PAGE CONTENT BEGINS HERE-->
                                <div class="span12">
                                    <div class="control-group">
                                        <label class="control-label" for="memo">备注:<span
                                                style="color:red">*</span></label>
                                        <div class="controls">
                                            <textarea name="memo" id="memo" class="input_fix" placeholder="备注"
                                                      th:value="*{memo}"
                                            </textarea>
                                        </div>
                                    </div>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="span12">
                                    <span style="color:red"><span th:if="${#fields.hasErrors('memo')}"
                                                                  th:errors="*{memo}">
                                        Name Error</span>&nbsp;</span>
                                </div>
                            </div>
                            <div class="row-fluid">
                                <div class="text-center span12">
                                    <button shiro:hasPermission="/stuffInfo/edit" class="btn btn-primary"
                                            type="submit"><i class="fa fa-floppy-o" aria-hidden="true"></i>提交
                                    </button>
                                    <button shiro:hasPermission="/stuffInfo/edit" class="btn btn-danger" type="reset">
                                        <i class="fa fa-times" aria-hidden="true"></i>取消
                                    </button>
                                    <a shiro:hasPermission="/stuffInfo/getAll" class="btn" href="getAll"
                                       th:href="@{/stuffInfo/getAll}"><i class="fa fa-reply"
                                                                         aria-hidden="true"></i>返回</a>
                                </div>
                            </div>
                        </form>
                        <!-- PAGE CONTENT ENDS -->
                    </div><!-- /.col -->
                </div><!-- /.row -->
            </div><!-- /.page-content -->
        </div>
    </div><!-- /.main-content -->
    <div th:replace="common/footer"/>
</div><!-- /.main-container -->
<div th:replace="common/buttom"/>

<script type="text/javascript">
    $("form").submit(function () {
        $(":submit", this).attr("disabled", "disabled");
    });
</script>
</body>
</html>
